query($sql); $db->disconnect(); //echo $sql; $i=0; while($result = $res->fetchRow()) { $news_id[$i] = $result[0]; $news_title[$i] = $result[1]; $news_date[$i] = date('d-m-Y',strtotime($result[2])); $i++; } $total_record = $i; ?>
company news
No company news in this month
'; }else{ for($i=0;$i < $total_record;$i++) {?>